
def dict2index(d):
    return [d[x] for x in d.keys()]


DOTA_split_to_r3is = {
    'small-vehicle': 0,
    'large-vehicle': 0,
    'plane': 2,
    'ship': 1,
    'harbor': 6,
    'ground-track-field': 3,
    'soccer-ball-field': 3,
    'tennis-court': 3,
    'baseball-diamond': 3,
    'swimming-pool': -1,
    'roundabout': 10,
    'basketball-court': 3,
    'storage-tank': 8,
    'bridge': 9,
    'helicopter': 2,
}

DOTA_split_to_r3is_index = dict2index(DOTA_split_to_r3is)

# order matters
DOTA_split_to_2_0 = {
    'small-vehicle': 10,
    'large-vehicle': 9,
    'plane': 0,
    'ship': 1,
    'harbor': 7,
    'ground-track-field': 6,
    'soccer-ball-field': 13,
    'tennis-court': 4,
    'baseball-diamond': 3,
    'swimming-pool': 14,
    'roundabout': 12,
    'basketball-court': 5,
    'storage-tank': 2,
    'bridge': 8,
    'helicopter': 11,
}

DOTA_split_to_2_0_index = dict2index(DOTA_split_to_2_0)

DOTA_2_0_to_r3is = {
    'plane': 2,
    'ship': 1,
    'storage tank': 8,
    'baseball diamond': 3,
    'tennis court': 3,
    'basketball court': 3,
    'ground track field': 3,
    'harbor': 6,
    'bridge': 9,
    'large vehicle': 0,
    'small vehicle': 0,
    'helicopter': 2,
    'roundabout': 10,
    'soccer ball field': 3,
    'swimming pool': -1,
    'container crane': 11,
    'airport': 5,
    'helipad': 5,
}

DOTA_2_0_to_r3is_index = dict2index(DOTA_2_0_to_r3is)


if __name__ == '__main__':
    print(DOTA_split_to_r3is)
